<template>
    <view class="contact-wrapper">
        <view class="icon-btn" @click="handleClick">
            <image :src="isBacktop ? '/static/backtop.png':'/static/contactus.png'" 
				class="icon" 
				style="width: 52rpx;height: 52rpx;"></image>
        </view>
    </view>
</template>

<script>
    export default {
        name:"contactUs",
        props: {
            isBacktop: {
                type: Boolean,
                default: false
            }
        },
        data() {
            return {};
        },
        methods: {
            handleClick() {
                if(this.isBacktop) {
                    uni.pageScrollTo({
                        scrollTop: 0, // 滚动到页面的顶部
                        duration: 100 // 滚动动画的时长，单位ms
                    });
                }
                else {
                    uni.navigateTo({
                    	url: '/pages/feedback/feedback'
                    });
                }
            }
        }
    }
</script>

<style lang="less">
    .contact-wrapper{
        position: fixed;
        right: 30rpx;
        bottom: 30rpx;
		.icon-btn{
			background-color:#3780ff;
			border-radius: 50%;
			padding: 20rpx;
			.icon{
				margin: auto;
				display: block;
			}
		}
        .popup-content{
            height: 100%;
            width: 100vw;
            background-color: #fff;
        }
    }
</style>